/**
////////////////////////////////////////////////////////////////////////////////
//                                                                            // 
//  Copyright (c) 2013 Santiago Benito Rebollo. Eclipse Public License - v 1.0//
//  @author Santiago Benito Rebollo.                                          // 
//  santiago.benito.rebollo@gmail.com                                         //
//                                                                            //  
////////////////////////////////////////////////////////////////////////////////
//                                                                            //
// THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC// 
// LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM//
// CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.                      //
//                                                                            //
// A Contributor may choose to distribute the Program in object code form     //
// under its own license agreement, provided that:                            //
//                                                                            //
// a) it complies with the terms and conditions of this Agreement; and        //
// b) its license agreement:                                                  //
//                                                                            //
// i) effectively disclaims on behalf of all Contributors all warranties and  //
// conditions, express and implied, including warranties or conditions of     //  
// title and non-infringement, and implied warranties or conditions of        //
// merchantability and fitness for a particular purpose;                      //
// ii) effectively excludes on behalf of all Contributors all liability for   //
// damages, including direct, indirect, special, incidental and consequential //
// damages, such as lost profits;                                             //
// iii) states that any provisions which differ from this Agreement are       //
// offered by that Contributor alone and not by any other party; and          //
// iv) states that source code for the Program is available from such         //
// Contributor, and informs licensees how to obtain it in a reasonable        //
// manner on or through a medium customarily used for software exchange.      //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
 */

package com.chago.fastrecado;
/**
 * This class is a wraped of vertex with a weight, and implements Comparable in
 * order to sort elements in an array.
 *
 * @author Santiago Benito Rebollo
 * @author santiago.benito.rebollo@gmail.com
 */
public class PonderedVertex  implements Comparable<PonderedVertex>{

	public Vertice vertice;
	public double weigth=0;

	/**
     * Te constructor has two arguments, the vertex and the weigth.
     * 
     * @param none
     * @throws none Exception
     * @post $none
   */     
	public PonderedVertex(Vertice v, double d) {
		vertice=v;
		weigth=d;

	}
	/**
     * This method implements the compareTo method of the comparable interface
     * 
     * @param none
     * @throws none Exception
     * @pre $none
     * @post $none
   */     
	public int compareTo(PonderedVertex other)
	{
		return Double.compare(weigth, other.weigth);
	}

}
